import Api from 'framework/Api';
import Session from 'framework/Session'

Api.config('base', {
  baseURL: process.env.API_CONFIGS.BASE.URL,
});
Api.config('base.auth', () => {
  const account = Session.get("account");
  return {
    baseURL: process.env.API_CONFIGS.BASE.URL,
    headers: {
      'X-AUTH-TOKEN': account.token
    }
  }
});
Api.config('base.auth3', () => {
  const account = Session.get("account");
  return {
    baseURL: process.env.API_CONFIGS.BASE.URL3,
    headers: {
      'X-AUTH-TOKEN': account.token
    }
  }
});
Api.config('base.auth8', () => {
  const account = Session.get("account");
  return {
    baseURL: process.env.API_CONFIGS.BASE.URL8,
    headers: {
      'X-AUTH-TOKEN': account.token
    }
  }
});

Api.config('base.baseUrl', () => {
  const account = Session.get("account");
  return {
    baseURL: process.env.API_CONFIGS.BASE.BASEURL,
    headers: {
      'X-AUTH-TOKEN': account.token
    }
  }
});

Api.config('static', {
  baseURL: '/static',
});
export default Api
